<?php
/*
<ul>
	<li><a href="javascript:;"><span><img src="/web-admin/assets/images/sample/logo1.gif" /></span>シフト</a></li>
	<li><a href="javascript:;"><span><img src="/web-admin/assets/images/sample/logo3.jpg" /></span>PIECE</a></li>
	<li><a href="javascript:;"><span><img src="/web-admin/assets/images/sample/logo2.jpg" /></span>Boost Gear</a></li>
</ul>
*/
require_once( '../../../../../system/libs/smarty.inc' );
require_once( '../../../../../system/libs/Class_DB.php' );
require_once( '../../../../../system/libs/login.inc.php' );
require_once( '../../../../../system/libs/const.php' );
require_once( '../../../../../system/libs/functions.php' );

$db  = new Class_DB;
$sql = "SELECT * FROM SITE_CONFIG WHERE enabled = 1 ORDER BY id ASC";
$res = $db->query($sql);

echo('<ul>');
while( $row = $db->fetch() ){
	$site_id = $row['id'];
	if(isset($_SESSION['ADMIN_LOGIN']['SITE'][$site_id])){
		echo('<li><a href="javascript:;" id="'. $site_id .'"><span><img src="/site_'. sprintf('%04d', $site_id) .'/images/'. $row['logo_file'] .'"/></span>'. htmlspecialchars($row['site_name'], ENT_QUOTES) .'</a></li>');
	}
}
echo('</ul>');

?>